package com.github.wisdom.common.github.modules.entity;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

@Data
public class SysUser extends Model<SysUser> {

	/**
	 * 主键ID
	 */
	@TableId(value = "user_id", type = IdType.AUTO)
	private Integer userId;
	/**
	 * 用户名
	 */
	private String username;

	private String password;
	/**
	 * 随机盐
	 */
	private String salt;
	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private Date createTime;
	/**
	 * 修改时间
	 */
	@TableField("update_time")
	private Date updateTime;
	/**
	 * 0-正常，1-删除
	 */
	@TableField("del_flag")
	private String delFlag;

	/**
	 * 简介
	 */
	private String introduction;
	/**
	 * 头像
	 */
	private String avatar;

	/**
	 * 部门ID
	 */
	@TableField("dept_id")
	private Integer deptId;

	@Override
	protected Serializable pkVal() {
		return this.userId;
	}

	@Override
	public String toString() {
		return "SysUser{" + "userId=" + userId + ", username='" + username + '\'' + ", password='" + password + '\''
				+ ", salt='" + salt + '\'' + ", createTime=" + createTime + ", updateTime=" + updateTime + ", delFlag='"
				+ delFlag + '\'' + ", introduction='" + introduction + '\'' + ", avatar='" + avatar + '\'' + ", deptId="
				+ deptId + '}';
	}
}
